home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / GL / svgamesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-07-16  |  2.4 KB  |  98 lines

  1. /*
  2.  * Mesa 3-D graphics library
  3.  * Version:  4.0
  4.  * Copyright (C) 1995-2001  Brian Paul
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the Free
  18.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21.  
  22. /*
  23.  * SVGA/Mesa interface for Linux.
  24.  */
  25.  
  26.  
  27. /*
  28.  * Intro to using the VGA/Mesa interface
  29.  *
  30.  * 1. #include the <vga.h> file
  31.  * 2. Call vga_init() to initialize the SVGA library.
  32.  * 3. Call vga_setmode() to specify the screen size and color depth.
  33.  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
  34.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  35.  *    Mesa assumes RGB mode.
  36.  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  37.  * 6. You can now use the Mesa API functions.
  38.  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  39.  *    to restore the original text screen.
  40.  *
  41.  * Notes
  42.  * 1. You must run your executable as root (or use the set UID-bit) because
  43.  *    the SVGA library requires it.
  44.  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
  45.  *    has to be done yet.
  46.  */
  47.  
  48.  
  49. #ifndef SVGAMESA_H
  50. #define SVGAMESA_H
  51.  
  52.  
  53. #define SVGAMESA_MAJOR_VERSION 4
  54. #define SVGAMESA_MINOR_VERSION 0
  55.  
  56.  
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60.  
  61.  
  62. #include "GL/gl.h"
  63.  
  64.  
  65.  
  66. /*
  67.  * This is the SVGAMesa context 'handle':
  68.  */
  69. typedef struct svgamesa_context *SVGAMesaContext;
  70.  
  71.  
  72.  
  73. /*
  74.  * doubleBuffer flag new in version 2.4
  75.  */
  76. extern int SVGAMesaInit( int GraphMode );
  77.  
  78. extern int SVGAMesaClose( void );
  79.  
  80. extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
  81.  
  82. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  83.  
  84. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  85.  
  86. extern void SVGAMesaSwapBuffers( void );
  87.  
  88. extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
  89.  
  90. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  91.  
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95.  
  96.  
  97. #endif
  98.